#include "ConditionImpl.h"

IdConditionImpl::IdConditionImpl()
{
}

IdConditionImpl::IdConditionImpl(const string& _value)
	:value(_value)
{

}

IdConditionImpl::~IdConditionImpl()
{

}

Condition::ConditionType IdConditionImpl::getConditionType()const
{
	return Condition::SAC_ID_CONDITION;
}

Condition* IdConditionImpl::Copy()const
{
	return new IdConditionImpl(value);
}

const string* IdConditionImpl::getNameSpaceURI()const
{
	return NULL;
}

const string* IdConditionImpl::getLocalName()const
{
	return NULL;
}

bool IdConditionImpl::getSpecified()const
{
	return true;
}

const string* IdConditionImpl::getValue()const
{
	return &value;
}

const string* IdConditionImpl::toString()const
{
	string* result = NULL;
	try
	{
		result = new string;
		result->append("#");
		result->append(value);
	}catch(std::exception& e)
	{
		if(result)
			delete result;
		return NULL;
	}
	return result;
}




